﻿using System;
using System.Collections.Generic;

using Fuse8.ContentManagementFramework.Domain;

namespace Fuse8.ContentManagementFramework.Administration.Models
{
    [Serializable]
    public class CmsAdminContentModel
    {
        public CmsContentType ContentType { get; set; }

        public IEnumerable<GenericCmsEntity> Contents { get; set; }

        public int Total { get; set; }

        public bool HidePager { get; set; }
    }

    [Serializable]
    public class CmsAdminContentCategoryModel
    {
        public int ContentTypeId { get; set; }
    }

    [Serializable]
    public class CmsAdminContentSaveModel
    {
        public int Id { get; set; }

        public int ContentTypeId { get; set; }

        public string ContentTitle { get; set; }

        public string ContentSummary { get; set; }

        public string ContentBody { get; set; }

        public int CategoryId { get; set; }

        public CmsContent ToContent()
        {
            return new CmsContent
            {
                Id = Id,
                ContentTypeId = ContentTypeId,
                ContentTitle = ContentTitle,
                ContentSummary = ContentSummary,
                ContentBody = ContentBody
            };
        }
    }
}